package com.jyw.common.core.page;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author 沈峻
 * @ClassName PageData
 * @Description TODO
 * @Date 2023/8/25 15:36
 **/
@ApiModel("分页数据")
@Data
@NoArgsConstructor
public class PageData<T> {

    /** 总记录数 */
    @ApiModelProperty("总记录数")
    private long total;

    /** 列表数据 */
    @ApiModelProperty("列表数据")
    private List<T> rows;

    public PageData(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }
}
